home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / Tools Plus 2.5 / Tools Plus 2.5 (C⁄C++ & Pascal) / User Manual / 22-Special Routines < prev    next >
Encoding:
Text File  |  1994-05-24  |  10.1 KB  |  360 lines  |  [TEXT/ttxt]

  1. 22  Special Routines
  2. ````````````````````
  3.  
  4.  
  5. Use these routines with caution, or don’t use them!
  6. ```````````````````````````````````````````````````
  7.   The following routines should be used with caution, or not at all.  The “comments or special instructions” column explains if the routine can be used in a limited way, or if a Tools Plus equivalent should be used instead.  If the column is blank, the Macintosh toolbox routine should not be used at all.
  8.  
  9.   If Inside Macintosh states that a specific routine should not be called because it is automatically called by the system when it starts up, you need not reference that routine in this section.
  10.  
  11.   Some routines that are not listed here can be used, but they will require a pointer to a window.  Your application can use Tools Plus’s WindowPointer routine to determine a window’s pointer.
  12.  
  13.  
  14.  
  15.  
  16. Toolbox Routine   Comments or Special Instructions
  17. ```````````````   ``````````````````````````````````````````````````````
  18. AddResMenu        Use AppleMenu
  19.  
  20. AppendMenu        Use Menu
  21.  
  22. BackPat           A window's background pattern should never be changed
  23.                   from white
  24.  
  25. BringToFront
  26.  
  27. CheckItem         Use CheckMenu
  28.  
  29. ClearMenuBar
  30.  
  31. CloseWindow       Use WindowClose
  32.  
  33. CountMItems       Use MenuItemCount or PopUpItemCount
  34.  
  35. DeleteMenu        Use RemoveMenu or RemovePopUp
  36.  
  37. DelMenuItem       Use RemoveMenu or RemovePopUp
  38.  
  39. DialogSelect      Modal dialogs are allowed, but a Tools Plus window is
  40.                   easier to use
  41.  
  42. DisableItem       Use EnableMenu
  43.  
  44. DisposeControl    Use with custom controls only
  45.  
  46. DisposeMenu
  47.  
  48. DisposeWindow
  49.  
  50. DlgCopy
  51.  
  52. DlgCut
  53.  
  54. DlgDelete
  55.  
  56. DlgPaste
  57.  
  58. DragControl       Use with custom controls only
  59.  
  60. DragWindow
  61.  
  62. Draw1Control      Use with custom controls only
  63.  
  64. DrawGrowIcon
  65.  
  66. DrawMenuBar       Use UpdateMenuBar
  67.  
  68. EnableItem        Use EnableMenu or EnablePopUp
  69.  
  70. EventAvail        Your application will intercept some events so that
  71.                   they never reach Tools Plus.  Also note that under
  72.                   MultiFinder and System 7, this routine will switch
  73.                   tasks to other applications and desk accessories.
  74.                      Don’t use this routine unless you really know what
  75.                   you are doing and you thoroughly test your results.
  76.  
  77. FindControl       Done automatically for buttons and scroll bars
  78.  
  79. FindWindow
  80.  
  81. FlashMenuBar
  82.  
  83. FlushEvents       InitToolsPlus flushes all events when Tools Plus is
  84.                   initialized.  You may flush mouse-down, mouse-up, key-
  85.                   down, key-up and auto-key events, as well as
  86.                   application-defined events 1 through 4.  When flushing
  87.                   mouse-up events, you may be disrupting a drag that is
  88.                   already in progress.  If the StillDown function
  89.                   returns true, a drag is in progress, and PollSystem
  90.                   will continue processing the drag until a mouse-up
  91.                   event is encountered.
  92.                      As a rule, don’t use this routine unless you really
  93.                   know what you are doing and you thoroughly test your
  94.                   results.
  95.  
  96. FrontWindow       This routine is almost useless if your application has
  97.                   a tool bar or floating palettes.  See ToolBarNumber,
  98.                   FirstPaletteNumber, FirstStdWindowNumber, and
  99.                   WorkWindowNumber
  100.  
  101. GetCRefCon        Use with custom controls only
  102.  
  103. GetCTitle         Use with custom controls only
  104.  
  105. GetCtlMax         Use with custom controls only.  For scroll bars, use
  106.                   GetScrollBarMax
  107.  
  108. GetCtlMin         Use with custom controls only.  For scroll bars, use
  109.                   GetScrollBarMin
  110.  
  111. GetCtlValue       Use with custom controls only.  For scroll bars, use
  112.                   GetScrollBarVal.  For buttons (check boxes or radio
  113.                   buttons), use ButtonIsSelected
  114.  
  115. GetItem           Use GetMenuString
  116.  
  117. GetItemCmd        Use GetMenuCmd
  118.  
  119. GetItemIcon       Use GetMenuIcon or GetPopUpIcon
  120.  
  121. GetItemMark       Use GetMenuMark or GetPopUpMark
  122.  
  123. GetMenu           No equivalent in Tools Plus because menus can’t be
  124.                   defined as resources.  Use Menu instead or NewPopUp.
  125.  
  126. GetNewControl     No equivalent in Tools Plus because buttons and scroll
  127.                   bars can’t be defined as resources.  Use NewButton or
  128.                   NewScrollBar instead.  Can be used for custom
  129.                   controls.
  130.  
  131. GetNewMBar        No equivalent in Tools Plus because menus can’t be
  132.                   defined as resources.  Use Menu instead or NewPopUp.
  133.  
  134. GetNewWindow      No equivalent in Tools Plus because windows can’t be
  135.                   defined as resources.  Use WindowOpen, WindowOpenRect,
  136.                   or ToolBarOpen instead.
  137.  
  138. GetNextEvent      Your application will intercept events so that they
  139.                   never reach Tools Plus.  Also note that under
  140.                   MultiFinder and System 7, this routine will switch
  141.                   tasks to other applications and desk accessories.
  142.                      Don’t use this routine unless you really know what
  143.                   you are doing and you thoroughly test your results.
  144.  
  145. GetOSEvent        Your application will intercept events so that they
  146.                   never reach Tools Plus.  Also note that under
  147.                   MultiFinder and System 7, this routine will switch
  148.                   tasks to other applications and desk accessories.
  149.                      As a rule, don’t use this routine unless you really
  150.                   know what you are doing and you thoroughly test your
  151.                   results.
  152.  
  153. GrowWindow
  154.  
  155. HideControl       Use with custom controls only
  156.  
  157. HideWindow        Use WindowDisplay
  158.  
  159. HiliteControl     Use with custom controls only.  For scroll bars, use
  160.                   EnableScrollBar.  For buttons, use EnableButton.
  161.  
  162. HiliteMenu        Use MenuHilite
  163.  
  164. HiliteWindow
  165.  
  166. InitCursor        Use CursorShape or ResetCursor routines instead
  167.  
  168. InitDialogs
  169.  
  170. InitMenus         Not required in THINK Pascal
  171.  
  172. InitWindows
  173.  
  174. InsertMenu        Use Menu or NewPopUp
  175.  
  176. InsertResMenu
  177.  
  178. InsMenuItem       Use InsertMenuItem
  179.  
  180. IsDialogEvent     Modal dialogs are allowed, but a Tools Plus window is
  181.                   easier to use
  182.  
  183. KillControls
  184.  
  185. List Manager      List Manager routines may be incorporated into your
  186.                   application to handle sophisticated lists.  However,
  187.                   the list’s scroll bars must be flagged as “custom
  188.                   controls,” and your application must handle all events
  189.                   pertaining to the list.
  190.  
  191. MenuKey
  192.  
  193. MenuSelect
  194.  
  195. MoveControl       Use with custom controls only
  196.  
  197. MovePortTo        The co-ordinates may be changed temporarily, providing
  198.                   they are reset prior to calling any Tools Plus routine
  199.  
  200. MoveWindow        Use WindowMove
  201.  
  202. NewControl        Use with custom controls only.  For scroll bars, use
  203.                   NewScrollBar.  For buttons, use NewButton
  204.  
  205. NewMenu           Use Menu or NewPopUp
  206.  
  207. NewWindow         WindowOpen, WindowOpenRect, or ToolBarOpen
  208.  
  209. NMInstall         Use SetNotification and PostNotification
  210.  
  211. NMRemove          Executed automatically (if required) when your
  212.                   application is activated
  213.  
  214. OpenDeskAcc
  215.  
  216. PopUpMenuSelect
  217.  
  218. PostEvent         Do not post app4Evt (or osEvt in System 7) events.
  219.                   They are used by MultiFinder.  They are used by
  220.                   MultiFinder and System 7’s Finder.
  221.  
  222. SelectWindow      Use ActivateWindow
  223.  
  224. SendBehind
  225.  
  226. SetCRefCon        Use with custom controls only
  227.  
  228. SetCTitle         Use with custom controls only.  For buttons, use
  229.                   ButtonTitle
  230.  
  231. SetCtlMax         Use with custom controls only.  For scroll bars, use
  232.                   SetScrollBarMax
  233.  
  234. SetCtlMin         Use with custom controls only.  For scroll bars, use
  235.                   SetScrollBarMin
  236.  
  237. SetCtlValue       Use with custom controls only.  For scroll bars, use
  238.                   SetScrollBarVal.  For buttons (check boxes or radio
  239.                   buttons), use SelectButton.
  240.  
  241. SetCursor         Use CursorShape or ResetCursor routines instead
  242.  
  243. SetEventMask      Upon startup, key-up events are disabled.  Do not
  244.                   disable the following events: mouseDown, MouseUp,
  245.                   keyDown, autoKey, updateEvt, activateEvt, and app4Evt
  246.  
  247. SetItem           Use RenameItem or RenamePopUp
  248.  
  249. SetItemCmd        Use MenuCmd
  250.  
  251. SetItemIcon       Use MenuIcon or PopUpIcon
  252.  
  253. SetItemMark       Use MenuMark or PopUpMark
  254.  
  255. SetItemStyle      Use MenuStyle or PopUpStyle
  256.  
  257. SetMenuBar
  258.  
  259. SetOrigin         The co-ordinates may be changed temporarily, providing
  260.                   they are reset to (0,0) prior to calling any Tools
  261.                   Plus routine
  262.  
  263. SetResLoad        Must be set to SetResLoad(true) before calling any
  264.                   Tools Plus routine
  265.  
  266. SetWTitle         Use WindowTitle
  267.  
  268. ShowControl       Use with custom controls only
  269.  
  270. ShowHide          Use WindowDisplay
  271.  
  272. ShowWindow        Use WindowDisplay
  273.  
  274. SizeControl       Use with custom controls only
  275.  
  276. SizeWindow        Use WindowSize
  277.  
  278. SpaceExtra        SpaceExtra must be set to 0, the initial value, when
  279.                   calling any Tools Plus routine
  280.  
  281. SysBeep           Use Beep (for convenience)
  282.  
  283. SystemClick
  284.  
  285. SystemEdit
  286.  
  287. SystemEvent
  288.  
  289. SystemMenu
  290.  
  291. TEActive          Use ActivateField
  292.  
  293. TEAutoView
  294.  
  295. TECalc
  296.  
  297. TEClick           Use ClickInField
  298.  
  299. TECopy
  300.  
  301. TECut
  302.  
  303. TEDeactivate      Use DeactivateField
  304.  
  305. TEDelete
  306.  
  307. TEDispose         Use DeleteField
  308.  
  309. TEFromScrap
  310.  
  311. TEGetText         Use GetFieldString
  312.  
  313. TEIdle            Called in PollSystem
  314.  
  315. TEInit
  316.  
  317. TEInsert
  318.  
  319. TEKey
  320.  
  321. TENew             Use NewField
  322.  
  323. TEPaste
  324.  
  325. TEPinScroll
  326.  
  327. TEScroll
  328.  
  329. TESelect
  330.  
  331. TESelView
  332.  
  333. TESetJust
  334.  
  335. TESetText
  336.  
  337. TEToScrap
  338.  
  339. TEUpdate
  340.  
  341. TrackBox
  342.  
  343. TrackControl      Done automatically for buttons and scroll bars
  344.  
  345. TrackGoAway
  346.  
  347. UnloadSeg         Do not unload the segments containing Tools Plus’s
  348.                   libraries
  349.  
  350. UpdtControl
  351.  
  352. WaitNextEvent     Your application will intercept events so that they
  353.                   never reach Tools Plus.  Also note that under
  354.                   MultiFinder and System 7, this routine will switch
  355.                   tasks to other applications and desk accessories.
  356.                      Don’t use this routine unless you really know what
  357.                   you are doing and you thoroughly test your results.
  358.  
  359. ZoomWindow
  360.